RemoveFirst Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Removes the first item in the bag. This is also the smallest item in the bag.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public T RemoveFirst()
Visual Basic (Declaration)
Public Function RemoveFirst As T
Visual C++
public:
T RemoveFirst ()

Return Value

The item that was removed, which was the smallest item in the bag.

Remarks

RemoveFirst() takes time O(log N), where N is the number of items in the bag.

Exceptions

ExceptionCondition
System..::InvalidOperationExceptionThe bag is empty.

See Also